EnergyPlus provides an encyclopaedic range of modelling capabilities, but every project is different and some may require special simulation functionality not provided in the standard engine. EMS provides custom simulation runtime control to override selected aspects of standard EnergyPlus behaviour. A simple programming language called EnergyPlus Runtime Language (Erl) is used to control custom behaviour. EnergyPlus interprets and executes the Erl program as the model is being simulated, thus the EMS provides a powerful way to extend the capability of EnergyPlus without the need to become an expert in programming its source code.
DesignBuilder also provides an additional set of Erl language extensions that allow scripts to be written to include logic and model data for selected zones, surfaces and windows. These extensions allow "portable" scripts to be written that apply to any model and so can be reused in future projects and shared with colleagues.
Tip: The help on DesignBuilder EMS is intended to be read together with the main EnergyPlus EMS application guide which provides most of the information required to understand how to use EMS with detailed descriptions and examples.
See the EMS Demo Tutorial for an introduction to using the DesignBuilder EMS runtime scripting system including DB Erl extensions.
The Energy Management System (EMS) is one of the high-level control methods available in EnergyPlus. An EMS script is able to access a wide variety of “sensor” data and use this data to direct various types of control actions. The original concept was to emulate, inside EnergyPlus, the types of controls possible with the digital energy management systems used in real buildings. However there are many other application for the EMS including:
The EMS allows the functionality of many of the existing high-level control objects to be overriden. For example the EMS can:
The EMS uses the concept of sensors to obtain information from elsewhere in the model for use in control calculations. Actuators are the mechanism for influencing changes on the model and code is written to tell the Erl processor how to apply the control laws.
Sensor objects are used to declare Erl variables which are linked to EnergyPlus output variables or meters. Actuators map Erl variables to control actuators elsewhere in EnergyPlus. The EMS then initiates control actions by changing the value of this variable inside an Erl program.
The way it works is probably best understood by studying working EMS scripts such as those provided by DesignBuilder alongside this documentation and that in the EnergyPlus EMS application guide.
Note: EMS is an advanced feature of EnergyPlus and is not for beginners. To use it you will need to be comfortable writing your own custom code and have a thorough understanding of how you want your models to behave. If you are intimidated by the idea of writing programs to adjust the fine details of how an EnergyPlus model runs then EMS is probably not for you. However, if you relish the idea of being able to write code to override default behaviour, you will find that EMS can help you model many features to your exact specification, significantly extending EnergyPlus' normal range of capabilities.
DesignBuilder includes some important extensions to the standard EnergyPlus EMS and Erl system allowing DB EMS programs to reused and shared. DesignBuilder extensions provide:
The DesignBuilder EMS functionality can be accessed from the Scripts toolbar icon and also from the Tools > Scripts menu option which opens the Script Manager dialog.
Previously created EMS programs are listed on the data panel to the right. These can be selected, copied, deleted and edited in the usual way.
Two steps are required to enable an EMS program:
Note: Selecting an EMS program on the Script Manager dialog is not enough to ensure its script is included in the simulation - the Enable program checkbox is the important setting.
DB Erl scripts are defined on the Edit Script dialog which provides utilities for quickly adding template script for new sensors, actuators, internal variables and programs.
Note: EMS scripts are only run for Simulations and are not applied to Cooling and Heating design calculations.
As well using EMS for advanced control and customisation you can also use the system to include simple additional IDF script with the model. This is an easy way to add more outputs or to add HVAC or other EnergyPlus IDF objects not yet supported by DesignBuilder. It offers a more flexible approach than the Include IDF option on the Model and Simulation options dialogs because the scripting system saves the IDF data within the dsb file making it completely self-contained and portable. Also you can store and manage a list of various IDF datasets with EMS which makes it easier to include/exclude various models and/or outputs in a controlled way. A further advantage when adding IDF for outputs is that the Add Output dialog lists all outputs available for the current model which provides a convenient way to select any extra outputs that are required.
It is possible to write quite complex EMS programs and there is plenty of scope for making mistakes, which can take time to track down and fix. Please be aware that the DesignBuilder Support Desk is not generally able to offer a free service for debugging or advising on the possible cause of errors in EMS programs. See the Support Desk Policy.
The EnergyPlus EMS application guide provides a section on debugging EMS programs which is a good starting point for tracking down problems.